#include <stdio.h>

int main()
{
    char letter;
    printf("请输入某一天的首字母:");
    while((letter = getchar()) != 'Y')
    {
        switch(letter)
        {
        case 'S':
            printf("请输入第二个字母:");
            if((letter = getchar()) == 'a')
            printf("saturday\n");
            else if((letter = getchar()) == 'u')
            printf("sunday\n");
            else printf("data error\n");
            break;
        case 'F':
            printf("friday\n");
            break;
        case 'M':
            printf("monday\n");
            break;
        case 'T':
            printf("请输入第二个字母:");
            if((letter == getchar()) == 'u')
            printf("tuesday\n");
            else if((letter == getchar()) == 'h')
            printf("thursday\n");
            else printf("data error\n");
            break;
        case 'W':
            printf("wednesday\n");
            break;
        default:
            printf("data error\n");
            break;
        }
    }
}